﻿using System;
using ClassFactory;
using System.Xml.Serialization;

namespace Configuration
{
    public class CSerializedWebPage : IFactoryObject
    {
        public string Name;
        public string NeedToJump;
        public string WebPageConcreteFactoryType;
        public string RemoteLocation;

        [System.Xml.Serialization.XmlIgnoreAttribute]
        public string Type
        {
            get
            {
                return WebPageConcreteFactoryType;
            }
            set
            {
                WebPageConcreteFactoryType = value;
            }
        }

        [System.Xml.Serialization.XmlIgnoreAttribute]
        public string Location
        {
            get
            {
                return RemoteLocation;
            }
            set
            {
                if(value == "Local")
                    RemoteLocation = null;
            }
        }
    }
}
